package com.itsession.blog.core.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class Constants {

    @Value("${file.upload.dic}")
    private String uploadPath;

    public final static String FILE_UPLOAD_DIC = getPropertiesUploadPath();//上传文件的默认url前缀，根据部署设置自行修改

    private static String uploadPathStr;

    @PostConstruct
    public void setPropertiesUploadPath() {
        uploadPathStr = this.uploadPath;
    }

    public static String getPropertiesUploadPath() {
        return uploadPathStr;
    }
}
